package ngames.com.sushitv.Fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import ngames.com.sushitv.R;
import ngames.com.sushitv.activity.FavorityActivity;

/**
 * Created by edmond on 16-7-26.
 */
public class AccountFragment extends Fragment implements View.OnClickListener {
    private View view;
    private LinearLayout favoritesBtn;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_account, container, false);
        initView();
        initEvent();
        return view;
    }



    private void initView() {
        favoritesBtn = (LinearLayout) view.findViewById(R.id.linear_favorites);
    }
    private void initEvent() {
        favoritesBtn.setOnClickListener(this);
    }
    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.linear_favorites:
                Intent favoritesIntent = new Intent(getActivity(), FavorityActivity.class);
                getActivity().startActivity(favoritesIntent);
                break;
        }
    }
}
